import React, { Component } from 'react';
import Home from './view/Home';
import { Route, Switch, Redirect, withRouter } from 'react-router-dom'
import Not from './view/Notfound'
import Login from './view/Login'
import Detail from './view/Detail'
import Liulan from './view/Liulan';
@withRouter
class App extends Component {

  render() {
    return (
      <>
        <Switch>
          <Route path="/home" children={router => <Home {...router} />} />
          <Route path="/login" component={Login} />
          <Route path="/detail/:id" component={Detail} />
          <Route path={'/Liulan'} component={Liulan} />
          <Redirect exact from='/' to="/home" />
          <Route component={Not} />
        </Switch>
      </>
    );
  }
}

export default App;
